3.4.99 \(\int (A+B x) (a+c x^2)^p (d+f x^2)^q \, dx\) [399]

3.4.99.1 Optimal result
3.4.99.2 Mathematica [A] (warning: unable to verify)
3.4.99.3 Rubi [A] (verified)
3.4.99.4 Maple [F]
3.4.99.5 Fricas [F]
3.4.99.6 Sympy [F(-1)]
3.4.99.7 Maxima [F]
3.4.99.8 Giac [F]
3.4.99.9 Mupad [F(-1)]

3.4.99.1 Optimal result

Integrand size = 24, antiderivative size = 167 \[ \int (A+B x) \left (a+c x^2\right )^p \left (d+f x^2\right )^q \, dx=A x \left (a+c x^2\right )^p \left (1+\frac {c x^2}{a}\right )^{-p} \left (d+f x^2\right )^q \left (1+\frac {f x^2}{d}\right )^{-q} \operatorname {AppellF1}\left (\frac {1}{2},-p,-q,\frac {3}{2},-\frac {c x^2}{a},-\frac {f x^2}{d}\right )+\frac {B \left (a+c x^2\right )^{1+p} \left (d+f x^2\right )^q \left (\frac {c \left (d+f x^2\right )}{c d-a f}\right )^{-q} \operatorname {Hypergeometric2F1}\left (1+p,-q,2+p,-\frac {f \left (a+c x^2\right )}{c d-a f}\right )}{2 c (1+p)} \]

output
A*x*(c*x^2+a)^p*(f*x^2+d)^q*AppellF1(1/2,-p,-q,3/2,-c*x^2/a,-f*x^2/d)/((1+ 
c*x^2/a)^p)/((1+f*x^2/d)^q)+1/2*B*(c*x^2+a)^(p+1)*(f*x^2+d)^q*hypergeom([- 
q, p+1],[2+p],-f*(c*x^2+a)/(-a*f+c*d))/c/(p+1)/((c*(f*x^2+d)/(-a*f+c*d))^q 
)
 
3.4.99.2 Mathematica [A] (warning: unable to verify)

Time = 0.27 (sec) , antiderivative size = 236, normalized size of antiderivative = 1.41 \[ \int (A+B x) \left (a+c x^2\right )^p \left (d+f x^2\right )^q \, dx=\frac {1}{2} x \left (a+c x^2\right )^p \left (d+f x^2\right )^q \left (B x \left (1+\frac {c x^2}{a}\right )^{-p} \left (1+\frac {f x^2}{d}\right )^{-q} \operatorname {AppellF1}\left (1,-p,-q,2,-\frac {c x^2}{a},-\frac {f x^2}{d}\right )+\frac {6 a A d \operatorname {AppellF1}\left (\frac {1}{2},-p,-q,\frac {3}{2},-\frac {c x^2}{a},-\frac {f x^2}{d}\right )}{3 a d \operatorname {AppellF1}\left (\frac {1}{2},-p,-q,\frac {3}{2},-\frac {c x^2}{a},-\frac {f x^2}{d}\right )+2 x^2 \left (c d p \operatorname {AppellF1}\left (\frac {3}{2},1-p,-q,\frac {5}{2},-\frac {c x^2}{a},-\frac {f x^2}{d}\right )+a f q \operatorname {AppellF1}\left (\frac {3}{2},-p,1-q,\frac {5}{2},-\frac {c x^2}{a},-\frac {f x^2}{d}\right )\right )}\right ) \]

input
Integrate[(A + B*x)*(a + c*x^2)^p*(d + f*x^2)^q,x]
 
output
(x*(a + c*x^2)^p*(d + f*x^2)^q*((B*x*AppellF1[1, -p, -q, 2, -((c*x^2)/a), 
-((f*x^2)/d)])/((1 + (c*x^2)/a)^p*(1 + (f*x^2)/d)^q) + (6*a*A*d*AppellF1[1 
/2, -p, -q, 3/2, -((c*x^2)/a), -((f*x^2)/d)])/(3*a*d*AppellF1[1/2, -p, -q, 
 3/2, -((c*x^2)/a), -((f*x^2)/d)] + 2*x^2*(c*d*p*AppellF1[3/2, 1 - p, -q, 
5/2, -((c*x^2)/a), -((f*x^2)/d)] + a*f*q*AppellF1[3/2, -p, 1 - q, 5/2, -(( 
c*x^2)/a), -((f*x^2)/d)]))))/2
 
3.4.99.3 Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.292, Rules used = {1343, 334, 334, 333, 353, 80, 79}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (A+B x) \left (a+c x^2\right )^p \left (d+f x^2\right )^q \, dx\)

\(\Big \downarrow \) 1343

\(\displaystyle A \int \left (c x^2+a\right )^p \left (f x^2+d\right )^qdx+B \int x \left (c x^2+a\right )^p \left (f x^2+d\right )^qdx\)

\(\Big \downarrow \) 334

\(\displaystyle A \left (a+c x^2\right )^p \left (\frac {c x^2}{a}+1\right )^{-p} \int \left (\frac {c x^2}{a}+1\right )^p \left (f x^2+d\right )^qdx+B \int x \left (c x^2+a\right )^p \left (f x^2+d\right )^qdx\)

\(\Big \downarrow \) 334

\(\displaystyle A \left (a+c x^2\right )^p \left (\frac {c x^2}{a}+1\right )^{-p} \left (d+f x^2\right )^q \left (\frac {f x^2}{d}+1\right )^{-q} \int \left (\frac {c x^2}{a}+1\right )^p \left (\frac {f x^2}{d}+1\right )^qdx+B \int x \left (c x^2+a\right )^p \left (f x^2+d\right )^qdx\)

\(\Big \downarrow \) 333

\(\displaystyle B \int x \left (c x^2+a\right )^p \left (f x^2+d\right )^qdx+A x \left (a+c x^2\right )^p \left (\frac {c x^2}{a}+1\right )^{-p} \left (d+f x^2\right )^q \left (\frac {f x^2}{d}+1\right )^{-q} \operatorname {AppellF1}\left (\frac {1}{2},-p,-q,\frac {3}{2},-\frac {c x^2}{a},-\frac {f x^2}{d}\right )\)

\(\Big \downarrow \) 353

\(\displaystyle \frac {1}{2} B \int \left (c x^2+a\right )^p \left (f x^2+d\right )^qdx^2+A x \left (a+c x^2\right )^p \left (\frac {c x^2}{a}+1\right )^{-p} \left (d+f x^2\right )^q \left (\frac {f x^2}{d}+1\right )^{-q} \operatorname {AppellF1}\left (\frac {1}{2},-p,-q,\frac {3}{2},-\frac {c x^2}{a},-\frac {f x^2}{d}\right )\)

\(\Big \downarrow \) 80

\(\displaystyle \frac {1}{2} B \left (d+f x^2\right )^q \left (\frac {c \left (d+f x^2\right )}{c d-a f}\right )^{-q} \int \left (c x^2+a\right )^p \left (\frac {c f x^2}{c d-a f}+\frac {c d}{c d-a f}\right )^qdx^2+A x \left (a+c x^2\right )^p \left (\frac {c x^2}{a}+1\right )^{-p} \left (d+f x^2\right )^q \left (\frac {f x^2}{d}+1\right )^{-q} \operatorname {AppellF1}\left (\frac {1}{2},-p,-q,\frac {3}{2},-\frac {c x^2}{a},-\frac {f x^2}{d}\right )\)

\(\Big \downarrow \) 79

\(\displaystyle A x \left (a+c x^2\right )^p \left (\frac {c x^2}{a}+1\right )^{-p} \left (d+f x^2\right )^q \left (\frac {f x^2}{d}+1\right )^{-q} \operatorname {AppellF1}\left (\frac {1}{2},-p,-q,\frac {3}{2},-\frac {c x^2}{a},-\frac {f x^2}{d}\right )+\frac {B \left (a+c x^2\right )^{p+1} \left (d+f x^2\right )^q \left (\frac {c \left (d+f x^2\right )}{c d-a f}\right )^{-q} \operatorname {Hypergeometric2F1}\left (p+1,-q,p+2,-\frac {f \left (c x^2+a\right )}{c d-a f}\right )}{2 c (p+1)}\)

input
Int[(A + B*x)*(a + c*x^2)^p*(d + f*x^2)^q,x]
 
output
(A*x*(a + c*x^2)^p*(d + f*x^2)^q*AppellF1[1/2, -p, -q, 3/2, -((c*x^2)/a), 
-((f*x^2)/d)])/((1 + (c*x^2)/a)^p*(1 + (f*x^2)/d)^q) + (B*(a + c*x^2)^(1 + 
 p)*(d + f*x^2)^q*Hypergeometric2F1[1 + p, -q, 2 + p, -((f*(a + c*x^2))/(c 
*d - a*f))])/(2*c*(1 + p)*((c*(d + f*x^2))/(c*d - a*f))^q)
 

3.4.99.3.1 Defintions of rubi rules used

rule 79
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(( 
a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c - a*d))^n))*Hypergeometric2F1[-n, m + 1 
, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}, x] 
&&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] 
 ||  !(RationalQ[n] && GtQ[-d/(b*c - a*d), 0]))
 

rule 80
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(c 
 + d*x)^FracPart[n]/((b/(b*c - a*d))^IntPart[n]*(b*((c + d*x)/(b*c - a*d))) 
^FracPart[n])   Int[(a + b*x)^m*Simp[b*(c/(b*c - a*d)) + b*d*(x/(b*c - a*d) 
), x]^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] &&  !IntegerQ[m] &&  !Integ 
erQ[n] && (RationalQ[m] ||  !SimplerQ[n + 1, m + 1])
 

rule 333
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim 
p[a^p*c^q*x*AppellF1[1/2, -p, -q, 3/2, (-b)*(x^2/a), (-d)*(x^2/c)], x] /; F 
reeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[p] || GtQ[a, 
0]) && (IntegerQ[q] || GtQ[c, 0])
 

rule 334
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim 
p[a^IntPart[p]*((a + b*x^2)^FracPart[p]/(1 + b*(x^2/a))^FracPart[p])   Int[ 
(1 + b*(x^2/a))^p*(c + d*x^2)^q, x], x] /; FreeQ[{a, b, c, d, p, q}, x] && 
NeQ[b*c - a*d, 0] &&  !(IntegerQ[p] || GtQ[a, 0])
 

rule 353
Int[(x_)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_Symbol] 
 :> Simp[1/2   Subst[Int[(a + b*x)^p*(c + d*x)^q, x], x, x^2], x] /; FreeQ[ 
{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0]
 

rule 1343
Int[((g_) + (h_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_)*((d_) + (f_.)*(x_)^2)^(q 
_), x_Symbol] :> Simp[g   Int[(a + c*x^2)^p*(d + f*x^2)^q, x], x] + Simp[h 
  Int[x*(a + c*x^2)^p*(d + f*x^2)^q, x], x] /; FreeQ[{a, c, d, f, g, h, p, 
q}, x]
 
3.4.99.4 Maple [F]

\[\int \left (B x +A \right ) \left (c \,x^{2}+a \right )^{p} \left (f \,x^{2}+d \right )^{q}d x\]

input
int((B*x+A)*(c*x^2+a)^p*(f*x^2+d)^q,x)
 
output
int((B*x+A)*(c*x^2+a)^p*(f*x^2+d)^q,x)
 
3.4.99.5 Fricas [F]

\[ \int (A+B x) \left (a+c x^2\right )^p \left (d+f x^2\right )^q \, dx=\int { {\left (B x + A\right )} {\left (c x^{2} + a\right )}^{p} {\left (f x^{2} + d\right )}^{q} \,d x } \]

input
integrate((B*x+A)*(c*x^2+a)^p*(f*x^2+d)^q,x, algorithm="fricas")
 
output
integral((B*x + A)*(c*x^2 + a)^p*(f*x^2 + d)^q, x)
 
3.4.99.6 Sympy [F(-1)]

Timed out. \[ \int (A+B x) \left (a+c x^2\right )^p \left (d+f x^2\right )^q \, dx=\text {Timed out} \]

input
integrate((B*x+A)*(c*x**2+a)**p*(f*x**2+d)**q,x)
 
output
Timed out
 
3.4.99.7 Maxima [F]

\[ \int (A+B x) \left (a+c x^2\right )^p \left (d+f x^2\right )^q \, dx=\int { {\left (B x + A\right )} {\left (c x^{2} + a\right )}^{p} {\left (f x^{2} + d\right )}^{q} \,d x } \]

input
integrate((B*x+A)*(c*x^2+a)^p*(f*x^2+d)^q,x, algorithm="maxima")
 
output
integrate((B*x + A)*(c*x^2 + a)^p*(f*x^2 + d)^q, x)
 
3.4.99.8 Giac [F]

\[ \int (A+B x) \left (a+c x^2\right )^p \left (d+f x^2\right )^q \, dx=\int { {\left (B x + A\right )} {\left (c x^{2} + a\right )}^{p} {\left (f x^{2} + d\right )}^{q} \,d x } \]

input
integrate((B*x+A)*(c*x^2+a)^p*(f*x^2+d)^q,x, algorithm="giac")
 
output
integrate((B*x + A)*(c*x^2 + a)^p*(f*x^2 + d)^q, x)
 
3.4.99.9 Mupad [F(-1)]

Timed out. \[ \int (A+B x) \left (a+c x^2\right )^p \left (d+f x^2\right )^q \, dx=\int {\left (c\,x^2+a\right )}^p\,{\left (f\,x^2+d\right )}^q\,\left (A+B\,x\right ) \,d x \]

input
int((a + c*x^2)^p*(d + f*x^2)^q*(A + B*x),x)
 
output
int((a + c*x^2)^p*(d + f*x^2)^q*(A + B*x), x)